<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.Color类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_color.html">Color</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_color-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.Color类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a384cccb17ac5a65b5f0ab428dccfc29a"><td class="memItemLeft" align="right" valign="top"><a id="a384cccb17ac5a65b5f0ab428dccfc29a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Color</b> (long nativeObj)</td></tr>
<tr class="separator:a384cccb17ac5a65b5f0ab428dccfc29a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5bd0efb7edaebd4358a06d488f2fdfd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classawtk_1_1_color.html">Color</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#af5bd0efb7edaebd4358a06d488f2fdfd">fromStr</a> (String str)</td></tr>
<tr class="separator:af5bd0efb7edaebd4358a06d488f2fdfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a173f74044245247c24a0e480ad146812"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#a173f74044245247c24a0e480ad146812">r</a> ()</td></tr>
<tr class="separator:a173f74044245247c24a0e480ad146812"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5564f3c9a3316a310ddbe97211712c57"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#a5564f3c9a3316a310ddbe97211712c57">g</a> ()</td></tr>
<tr class="separator:a5564f3c9a3316a310ddbe97211712c57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad4398fc5bd8aa55cb91f2156260306d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#aad4398fc5bd8aa55cb91f2156260306d">b</a> ()</td></tr>
<tr class="separator:aad4398fc5bd8aa55cb91f2156260306d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacce91180ba5e8848fe44c68840b18f0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#aacce91180ba5e8848fe44c68840b18f0">a</a> ()</td></tr>
<tr class="separator:aacce91180ba5e8848fe44c68840b18f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88eed1c7aa0854d22aed1fa132ec2def"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#a88eed1c7aa0854d22aed1fa132ec2def">destroy</a> ()</td></tr>
<tr class="separator:a88eed1c7aa0854d22aed1fa132ec2def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7341b9c53791c9d4ed3e43d4054fd1a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#a7341b9c53791c9d4ed3e43d4054fd1a2">getColor</a> ()</td></tr>
<tr class="separator:a7341b9c53791c9d4ed3e43d4054fd1a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:aec7f5b51ce0013449e7c090986929d7b"><td class="memItemLeft" align="right" valign="top"><a id="aec7f5b51ce0013449e7c090986929d7b"></a>
static <a class="el" href="classawtk_1_1_color.html">Color</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:aec7f5b51ce0013449e7c090986929d7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadcd969d1ce674e9dc65434d1267322e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_color.html">Color</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#aadcd969d1ce674e9dc65434d1267322e">create</a> (int <a class="el" href="classawtk_1_1_color.html#a173f74044245247c24a0e480ad146812">r</a>, int <a class="el" href="classawtk_1_1_color.html#aad4398fc5bd8aa55cb91f2156260306d">b</a>, int <a class="el" href="classawtk_1_1_color.html#a5564f3c9a3316a310ddbe97211712c57">g</a>, int <a class="el" href="classawtk_1_1_color.html#aacce91180ba5e8848fe44c68840b18f0">a</a>)</td></tr>
<tr class="separator:aadcd969d1ce674e9dc65434d1267322e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af80c2f0790a3c365fb1c5303997f474c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_color.html">Color</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_color.html#af80c2f0790a3c365fb1c5303997f474c">cast</a> (<a class="el" href="classawtk_1_1_color.html">Color</a> color)</td></tr>
<tr class="separator:af80c2f0790a3c365fb1c5303997f474c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a35ee998b9e181ffa05c7812233b93dcb"><td class="memItemLeft" align="right" valign="top"><a id="a35ee998b9e181ffa05c7812233b93dcb"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:a35ee998b9e181ffa05c7812233b93dcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>颜色。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="aacce91180ba5e8848fe44c68840b18f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacce91180ba5e8848fe44c68840b18f0">&#9670;&nbsp;</a></span>a()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Color.a </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取alpha通道的值。</p>
<p>主要供脚本语言使用。</p>
<dl class="section return"><dt>返回</dt><dd>返回alpha通道的值。 </dd></dl>

</div>
</div>
<a id="aad4398fc5bd8aa55cb91f2156260306d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad4398fc5bd8aa55cb91f2156260306d">&#9670;&nbsp;</a></span>b()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Color.b </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取蓝色通道的值。</p>
<p>主要供脚本语言使用。</p>
<dl class="section return"><dt>返回</dt><dd>返回蓝色通道的值。 </dd></dl>

</div>
</div>
<a id="af80c2f0790a3c365fb1c5303997f474c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af80c2f0790a3c365fb1c5303997f474c">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_color.html">Color</a> awtk.Color.cast </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classawtk_1_1_color.html">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为color对象。</p>
<p>供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>color对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>color对象。 </dd></dl>

</div>
</div>
<a id="aadcd969d1ce674e9dc65434d1267322e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadcd969d1ce674e9dc65434d1267322e">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_color.html">Color</a> awtk.Color.create </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建color对象。</p>
<p>主要供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>红色通道。 </td></tr>
    <tr><td class="paramname">b</td><td>蓝色通道。 </td></tr>
    <tr><td class="paramname">g</td><td>绿色通道。 </td></tr>
    <tr><td class="paramname">a</td><td>alpha通道。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>color对象。 </dd></dl>

</div>
</div>
<a id="a88eed1c7aa0854d22aed1fa132ec2def"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88eed1c7aa0854d22aed1fa132ec2def">&#9670;&nbsp;</a></span>destroy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.Color.destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>销毁color对象。 主要供脚本语言使用。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af5bd0efb7edaebd4358a06d488f2fdfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5bd0efb7edaebd4358a06d488f2fdfd">&#9670;&nbsp;</a></span>fromStr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classawtk_1_1_color.html">Color</a> awtk.Color.fromStr </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建color对象。</p>
<p>主要供脚本语言使用。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>css类似的颜色值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>color对象。 </dd></dl>

</div>
</div>
<a id="a5564f3c9a3316a310ddbe97211712c57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5564f3c9a3316a310ddbe97211712c57">&#9670;&nbsp;</a></span>g()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Color.g </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取绿色通道的值。</p>
<p>主要供脚本语言使用。</p>
<dl class="section return"><dt>返回</dt><dd>返回绿色通道的值。 </dd></dl>

</div>
</div>
<a id="a7341b9c53791c9d4ed3e43d4054fd1a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7341b9c53791c9d4ed3e43d4054fd1a2">&#9670;&nbsp;</a></span>getColor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Color.getColor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>颜色的数值。 </p>

</div>
</div>
<a id="a173f74044245247c24a0e480ad146812"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a173f74044245247c24a0e480ad146812">&#9670;&nbsp;</a></span>r()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.Color.r </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>获取红色通道的值。</p>
<p>主要供脚本语言使用。</p>
<dl class="section return"><dt>返回</dt><dd>返回红色通道的值。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/Color.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
